<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.formSubFun("#form",'/modules/loan/borrow/borrowVerifyBz.html');		
	});
</script>
<div class="popShow" style="padding-bottom:0;">
	<div class="showItem">
		<span>标类型：</span>
        <#if borrow.type == 112>
            <#if borrow.category == 1>
                趣豆计划-普通标
            <#elseif borrow.category == 0>
                趣豆计划-新手专享
            <#elseif borrow.category == 2>
                趣豆计划-体验标
            </#if>
        <#elseif borrow.type == 103>
            <#if borrow.category == 1>
                趣影计划-普通标
            <#elseif borrow.category == 0>
                趣影计划-新手专享
            <#elseif borrow.category == 2>
                趣影计划-体验标
            </#if>
        <#elseif borrow.type == 117>
            <#if borrow.category == 1>
                0元购-普通标
            <#elseif borrow.category == 0>
                0元购-新手专享
            <#elseif borrow.category == 2>
                0元购-体验标
            </#if>
        </#if>
	</div>
	<div class="showItem">
		<span>标名称：</span>
		 ${borrow.name}
	</div>
	<div class="showItem">
		<span>借款人：</span>
		${user.userName}
	</div>
	<div class="showItem">
		<span>状态：</span>
		<#if borrow.status==-1>
			已撤回
		<#elseif borrow.status==0>
			等待初审
		<#elseif borrow.status==1 && borrow.accountYes == borrow.account>
			满标待审
		<#elseif borrow.status==1>
			招标中
		<#elseif borrow.status==2>
			初审未通过
		<#elseif borrow.status==3>
			复审通过
		<#elseif borrow.status==4 || borrow.status==49>
			复审未通过
		<#elseif borrow.status==5 || borrow.status==59>
			用户取消
		<#elseif borrow.status==6>
			还款中
		<#elseif borrow.status==7>
			部分还款
		<#elseif borrow.status==8>
			<#if borrow.type==110 >
			停止流转
			<#else>
			还款成功
			</#if>
		<#else>
			错误状态
		</#if>
	</div>
	<div class="showItem">
		<span>借款用途：</span>
		<@linkage plantext='plantext' default=borrow.borrowUse nid="borrow_use"/>
	</div>
	<div class="showItem">
		<span>借款期限：</span>
		<#if borrow.type==101>
		满标即还
		<#elseif borrow.borrowTimeType==1>${borrow.timeLimit!"-"} 天<#else>${borrow.timeLimit!"-"} 个月</#if>
	</div>
	<div class="showItem">
		<span>还款方式：</span>
		<@linkage plantext="plantext" default=borrow.style nid="borrow_style" disabled="disabled"/>
	</div>
	<div class="showItem">
		<span>借款总金额：</span>
		${borrow.account} 元
	</div>
	<div class="showItem">
		<span>年利率：</span>
		${borrow.apr} %
	</div>
	<div class="showItem">
		<span>是否推荐：</span>
		${isRecommend}
	</div>
	<#if borrow.type!=110>
	<div class="showItem">
		<span>最低投标金额：</span>
		<#if borrow.lowestAccount??&&borrow.lowestAccount?number gt 0>${borrow.lowestAccount}元<#else>无限制</#if>
	</div>
	<div class="showItem">
		<span>最多投标总额：</span>
		<#if borrow.mostAccount??&&borrow.mostAccount?number gt 0>${borrow.mostAccount}元<#else>无限制</#if>
	</div>
	</#if>
	<#if borrow.type==110>
	<div class="showItem">
		<span>单笔最低投标金额：</span>
		<#if borrow.lowestSingleLimit??&&borrow.lowestSingleLimit?number gt 0>${borrow.lowestSingleLimit}元<#else>无限制</#if>
	</div>
	<div class="showItem">
		<span>单笔最多投标总额：</span>
		<#if borrow.mostSingleLimit??&&borrow.mostSingleLimit?number gt 0>${borrow.mostSingleLimit}元<#else>无限制</#if>
	</div>
	</#if>
	<div class="showItem">
		<span>添加时间：</span>
		${borrow.addTime?string("yyyy-MM-dd hh:mm:ss")}
	</div>
	<div class="showItem">
		<span>IP：</span>
		${borrow.addIp}
	</div>
</div>
<!-- 图片列表 -->
<div class="borrowForm">
	<div class="guarantee_type">
		<span>图片：</span>
	        <div id="uploadGuaranteeBox" data-arr="uploadFile" style="height: auto;">
	            <ul class="photoUpload" style="list-style: none; padding: 0; margin: 0;">
	            	<#list picList as pic>
	                
                    <#if pic.type==4>
                    <li data-mum="${pic.id}">
                    <a href="${image_server_url}${pic.picPath}" class="fileshow" rel="guaranteePic">
                    <img src="${image_server_url}${pic.picPath}"/></a>
                    </li> 
                    </#if>                     
                	
                	</#list>
	            </ul>
	       </div>
	</div>	
</div>
<!-- 图片列表 -->
<div class="borrowForm">
	<div class="guarantee_type">
		<span>缩略图：</span>
	        <div data-arr="uploadFile" style="height: auto;">
	            <ul class="photoUpload" style="list-style: none; padding: 0; margin: 0;">
	            	<#list picList as pic>
	                <#if pic.type==6>
	                <li data-mum="${pic.id}">
                    <a href="${image_server_url}${pic.picPath}" class="fileshow" rel="guaranteePic">
                    <img src="${image_server_url}${pic.picPath}"/></a> 
                    </li>
                    </#if>                  
                	</#list>
	            </ul>
	       </div>
	</div>	
</div>
<div class="popForm" style="padding-top:0;">
<form id="form" method="post">
	<div class="formitm">
		<label class="lab">是否通过：</label>
		<div class="ipt">
		   <input type="radio" name="status" class="easyui-validatebox" value="1" data-options="required: true"/>通过
			<input type="radio" name="status" class="easyui-validatebox" value="0" data-options="required: true" checked="checked"/>不通过
		</div>
	</div>
	<#if borrow.type != 101>
	   <#if borrow.category == 2>    
		<div class="formitm" id="tyid"> 
		      
			<div class="ipt">
				<input type="hidden" name="openExperience" class="easyui-validatebox openExperience" value="1" />
				<div class="experienceBox">
                    <span>体验券投标最大额度（元）</span><input type="text" name="mostExperience" data-options="required: false" style="width:60px;margin-bottom: 10px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,&quot;&quot;)" maxlength="7" class="easyui-validatebox mostExperience" />
                    <br><span>单人体验券投标最大额度（元）</span><input type="text" name="mostExperienceSingle" data-options="required: false" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,&quot;&quot;)" maxlength="7" class="easyui-validatebox mostExperienceSingle" />
				</div>
			</div>   
			  
		</div>
		</#if>     
	</#if>
	<div class="formitm" >
		<label class="lab">备注：</label>
		<div class="ipt">
		   <textarea name="remark" class="w400 easyui-validatebox" data-options="required: false"></textarea>
		</div>
	</div>
	<input name="borrowVerifyTokenBz" value="${borrowVerifyTokenBz!}" type="hidden">
	<input name="id" value="${borrow.id}" type="hidden"/>
</form>
</div>
<script type="text/javascript">seajs.use("${theme_dir}/js/ajaxfileupload");seajs.use("${theme_dir}/js/upload");</script>
<!-- 图片预览-->
<script type="text/javascript">
	$(".fileshow").fancybox();
//	$(".experienceBox").css({"display":"none"});
//	var str = '<span>体验券投标最大额度（元）</span><input type="text" name="mostExperience" data-options="required: true" style="width:60px;margin-bottom: 10px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,&quot;&quot;)" maxlength="7" class="easyui-validatebox mostExperience" />'
//			+'<br><span>单人体验券投标最大额度（元）</span><input type="text" name="mostExperienceSingle" data-options="required: true" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,&quot;&quot;)" maxlength="7" class="easyui-validatebox mostExperienceSingle" />';
//
//	$(".openExperience").click(function(){
//		if($(this).attr("checked")){
//			$(".experienceBox").css({"display":"block"});
//			$(str).appendTo(".experienceBox");	// 解决动态生成html中验证框不起效的问题
//		    $.parser.parse(".experienceBox");
//		}else{
//			$(".experienceBox").css({"display":"none"});
//			$(".experienceBox").html('');
//		}
//	});

var cval=$(".formitm input[name='status']:checked").val();
	if(cval==="0"){		
		$("#tyid").hide();	
	}
	$(".formitm input[name='status']").click(function(){
		var val = $(this).val();
		if(val==="0"){
			$("input[name='mostExperience']").validatebox({required: false});
			$("input[name='mostExperienceSingle']").validatebox({required: false});
			$("#tyid").hide();	
		}else{
			$("input[name='mostExperience']").validatebox({required: true});
			$("input[name='mostExperienceSingle']").validatebox({required: true});
			$("#tyid").show();			
		}
	});


</script>